package pt.nmfa.peste.entity;

// Generated Mar 5, 2011 1:52:20 PM by Hibernate Tools 3.3.0.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.validator.NotNull;

/**
 * StatusActionsScript generated by hbm2java
 */
@Entity
@Table(name = "statusActionsScript", catalog = "HomeDB")
public class StatusActionsScript implements java.io.Serializable {

	private Integer statusActionsScriptId;
	private DeviceActions deviceActions;
	private StatusActions statusActions;
	private int order;
	private Set<StatusScriptParms> statusScriptParmses = new HashSet<StatusScriptParms>(
			0);

	public StatusActionsScript() {
	}

	public StatusActionsScript(DeviceActions deviceActions,
			StatusActions statusActions, int order) {
		this.deviceActions = deviceActions;
		this.statusActions = statusActions;
		this.order = order;
	}

	public StatusActionsScript(DeviceActions deviceActions,
			StatusActions statusActions, int order,
			Set<StatusScriptParms> statusScriptParmses) {
		this.deviceActions = deviceActions;
		this.statusActions = statusActions;
		this.order = order;
		this.statusScriptParmses = statusScriptParmses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "statusActionsScriptId", unique = true, nullable = false)
	public Integer getStatusActionsScriptId() {
		return this.statusActionsScriptId;
	}

	public void setStatusActionsScriptId(Integer statusActionsScriptId) {
		this.statusActionsScriptId = statusActionsScriptId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "deviceActionsId", nullable = false)
	@NotNull
	public DeviceActions getDeviceActions() {
		return this.deviceActions;
	}

	public void setDeviceActions(DeviceActions deviceActions) {
		this.deviceActions = deviceActions;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "statusActionId", nullable = false)
	@NotNull
	public StatusActions getStatusActions() {
		return this.statusActions;
	}

	public void setStatusActions(StatusActions statusActions) {
		this.statusActions = statusActions;
	}

	@Column(name = "order", nullable = false)
	public int getOrder() {
		return this.order;
	}

	public void setOrder(int order) {
		this.order = order;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "statusActionsScript")
	public Set<StatusScriptParms> getStatusScriptParmses() {
		return this.statusScriptParmses;
	}

	public void setStatusScriptParmses(
			Set<StatusScriptParms> statusScriptParmses) {
		this.statusScriptParmses = statusScriptParmses;
	}

}
